getAxisValue

open fun getAxisValue(event: MotionEvent, axis: Int): Float(source)

Deprecated

Call getAxisValue directly. This method will be removed in a future release.

Get axis value for the first pointer index (may be an arbitrary pointer identifier).

Parameters

event

motion event for which to get the value.

axis

The axis identifier for the axis value to retrieve.

See also


open fun getAxisValue(event: MotionEvent, axis: Int, pointerIndex: Int): Float(source)

Deprecated

Call getAxisValue directly. This method will be removed in a future release.

Returns the value of the requested axis for the given pointer index (use getPointerId to find the pointer identifier for this index).

Return

The value of the axis, or 0 if the axis is not available.

Parameters

event

motion event for which to get the value.

axis

The axis identifier for the axis value to retrieve.

pointerIndex

Raw index of pointer to retrieve. Value may be from 0 (the first pointer that is down) to getPointerCount-1.

See also